package com.itheima.daimakuai;
/*
成员代码块
构造代码块
 */
public class Student {
    private static String name;
    {
        System.out.println("恭喜你创建成功");

    }
    static {
        System.out.println("哈哈哈, 我肯定来的最早");

    }
    public Student() {
        System.out.println("无参构造调用了" );
    }

    public Student(String name) {
        this.name = name;
        System.out.println("带参构造调用了" );
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                '}';
    }


}
